TStack is a template container based on the LIFO-principle (last in/first out). More...
#include <tstack.h>
Public Member Functions | |
TStack () | |
Default stack constructor. | |
TStack (const TStack< T > &) | |
Stack copy constructor. | |
~TStack () | |
Stack destructor. | |
TStack< T > & | operator= (const TStack< T > &) |
Assignment operator. | |
bool | push (const T &) |
Push item onto stack (add to stack). | |
T | pop () |
Pop top item from stack (return copy of item and remove from stack). | |
const T & | peek () const |
Return top item (but leave item on the stack). |
TStack is a template container based on the LIFO-principle (last in/first out).
http://en.wikipedia.org/wiki/Stack_(data_structure)
Return values in error cases:
TStack | ( | ) | [inline] |
Default stack constructor.
~TStack | ( | ) | [inline] |
Stack destructor.
Assignment operator.
stack | Assignment operator copies the contents of the input stack into this stack. |
Reimplemented from TLinkedList< T >.
bool push | ( | const T & | obj | ) | [inline] |
Push item onto stack (add to stack).
T pop | ( | ) | [inline] |
Pop top item from stack (return copy of item and remove from stack).
const T & peek | ( | ) | const [inline] |
Return top item (but leave item on the stack).